home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / ARSRC21.ZIP / AR256H2.CPP < prev    next >
C/C++ Source or Header  |  1995-06-02  |  40KB  |  1,289 lines

  1. // class for game messages
  2. // requires vars defined after main bunch of includes
  3.  
  4. extern int bigtile(int,int,unsigned char far *,char,char);
  5. extern int memerror();
  6. extern char mygetch();
  7. extern int cycleballs();
  8. //extern void downbip(int);
  9. #include <graphics.h>
  10. #include <stdlib.h>
  11. #include <stdio.h>
  12. #include <string.h>
  13. #include <conio.h>
  14. #include "ar256h.cpp"
  15. #include "ar256def.h"
  16.  
  17. #include "ar256ex.h"
  18. extern mouse m;
  19.  
  20. screenmsgs::screenmsgs()
  21.     {
  22.     FILE *in;int i;
  23.     printf("Checking screen...\n");
  24.     logsp=(char *)malloc(0x400);
  25.     loga=(char *)malloc(0x400);
  26.     logb=(char *)malloc(0x400);
  27.     if((logsp==NULL)||(loga==NULL)||(logb==NULL))memerror();
  28.     in=fopen("loga.dat","rb");
  29.  
  30.         for (i=0;i<0x400;++i)
  31.         {
  32.         fscanf(in,"%c",&loga[i]);
  33.         }
  34.     fclose(in);
  35.     in=fopen("logb.dat","rb");
  36.  
  37.         for (i=0;i<0x400;++i)
  38.         {
  39.         fscanf(in,"%c",&logb[i]);
  40.         }
  41.     fclose(in);
  42.     in=fopen("spells.dat","rb");
  43.  
  44.         for (i=0;i<0x400;++i)
  45.         {
  46.         fscanf(in,"%c",&logsp[i]);
  47.         }
  48.     fclose(in);
  49.  
  50.     }
  51. screenmsgs::~screenmsgs()
  52.     {
  53.     free(logsp);free(loga);free(logb);
  54.     }
  55.  
  56. void screenmsgs::usespace(void)
  57.     {
  58.     setcolor(0x07);setfillstyle(1,0);
  59.     bar(190,310,330,322);
  60.     rectangle(190,310,330,322);
  61.     outtextxy(195,312,"Press space...");
  62. }
  63.  
  64. void screenmsgs::usemouse(void)
  65.     {
  66.     m.bitmapoff();
  67.     setcolor(0x07);setfillstyle(1,0);
  68.     bar(190,260,300,292);
  69.     rectangle(190,260,300,292);
  70.     outtextxy(200,262,"Use the mouse to");
  71.     outtextxy(200,272,"highlight squares;");
  72.     outtextxy(200,282,"Space to select one.");
  73.     m.bitmapon(cursor,pcol[curpla]);
  74. }
  75.  
  76. void screenmsgs::usekeys(void)
  77.     {
  78.     setcolor(0x07);setfillstyle(1,0);
  79.     bar(200,305,335,327);
  80.     rectangle(200,305,335,327);
  81.     outtextxy(210,307,"Use keypad to");
  82.     outtextxy(210,317,"select a square.");
  83.  
  84. }
  85.  
  86. void screenmsgs::plecho(unsigned char)
  87.     {
  88.     int x=486,y=100;
  89.     setfillstyle(0,0);
  90.     bar (x,y,x+80,y+10);
  91.     setcolor(pcol[curpla]);
  92.     outtextxy(x,y,pname[curpla]);
  93.     }
  94.  
  95. void screenmsgs::mecho(unsigned char,unsigned char)
  96.     {
  97.     char outbuf[3];
  98.     int x=486,y=200;
  99.     setfillstyle(0,0);
  100.     bar (x,y,x+150,y+50);
  101.     setcolor(0x07);
  102.     outtextxy(x,y,mon[curpla][curmon].name);
  103.     outtextxy(x,y+10,"Attack strength: ");
  104.     outtextxy(x+130,y+10,itoa(mon[curpla][curmon].attack,outbuf,10));
  105.     outtextxy(x,y+20,"Defend strength: ");
  106.     outtextxy(x+130,y+20,itoa(mon[curpla][curmon].defend,outbuf,10));
  107.     if (mon[curpla][curmon].mshots)
  108.         {
  109.         setcolor(0x07);
  110.         outtextxy(x+58,y+30,"Range: ");
  111.         outtextxy(x+112,y+30,itoa(mon[curpla][curmon].range,outbuf,10));
  112.         outtextxy(x+120,y+30,"x");
  113.         outtextxy(x+128,y+30,itoa(mon[curpla][curmon].mshots,outbuf,10));
  114.         }
  115.  
  116.     if ((mon[curpla][curmon].id>=0x80)&&(mon[curpla][curmon].id!=0xff))
  117.         {
  118.         setcolor(0x08);
  119.         outtextxy(x,y+30,"(undead)");
  120.         }
  121.     if (mon[curpla][curmon].fly)
  122.         {
  123.         setcolor(0x03);
  124.         outtextxy(x,y+40,"(flying)");
  125.         }
  126.     if (mon[curpla][curmon].spellnum)
  127.         {
  128.         setcolor(0x05);
  129.         outtextxy(x+70,y+40,"(magical)");
  130.         }
  131.     }
  132.  
  133. void screenmsgs::fecho(monster attacker,monster defender,char win)
  134.     {
  135.     int x=486,y=300;
  136.  
  137.     setfillstyle(0,0);
  138.     bar (x,y,x+149,y+50);
  139.     setcolor(pcol[attacker.whatside]);
  140.     outtextxy(x,y,attacker.name);
  141.     setcolor(0x07);
  142.     outtextxy(x,y+10,attacker.atmes);
  143.     setcolor(pcol[defender.whatside]);
  144.     outtextxy(x,y+20,defender.name);
  145.     if (win==1)//if attack fails
  146.         {
  147.         setcolor(0x07);
  148.         outtextxy(x,y+30,attacker.defmes);
  149.         }
  150.     if (win==0)//if it succeeds
  151.         {
  152.         setcolor(0x04);
  153.         outtextxy(x,y+30,attacker.diemes);
  154.  
  155.         }
  156.     if    (win==2)//if corpse
  157.         {
  158.         setcolor(0x05);
  159.         outtextxy(x,y+30,"but a little late...");
  160.         }
  161.     if    (win==3)//if undead
  162.         {
  163.         setcolor(0x0a);
  164.         outtextxy(x,y+30,"who's already died...");
  165.         }
  166.  
  167. }
  168.  
  169. void screenmsgs::shecho(monster attacker,monster defender,char win,char kind)
  170.     {
  171.     int x=486,y=300;
  172.  
  173.     setfillstyle(0,0);
  174.     bar (x,y,x+149,y+50);
  175.     setcolor(pcol[attacker.whatside]);
  176.     outtextxy(x,y,attacker.name);
  177.     setcolor(0x07);
  178.     if(strlen(attacker.shotmes)>2)  //in case something that cant usually fire does fire
  179.         outtextxy(x,y+10,attacker.shotmes);
  180.     else
  181.         outtextxy(x,y+10,"shoots at");
  182.  
  183.     setcolor(pcol[defender.whatside]);
  184.     outtextxy(x,y+20,defender.name);
  185.     if (win==0)//if tree
  186.         {
  187.         setcolor(0x07);
  188.         outtextxy(x,y+30,"but hits a tree.");
  189.         }
  190.     if (win==1)//if miss
  191.         {
  192.         setcolor(0x05);
  193.         outtextxy(x,y+30,"who dodges.");
  194.  
  195.         }
  196.     if    (win==2)//if hit
  197.         {
  198.         setcolor(0x04);
  199.         switch (kind)
  200.             {
  201.             case 0:
  202.             outtextxy(x,y+30,"and grins nastily.");break;
  203.             case 1:
  204.             outtextxy(x,y+30,"transfixing it.");break;
  205.             case 2:
  206.             outtextxy(x,y+30,"frying it's brain.");break;
  207.             case 3:
  208.             outtextxy(x,y+30,"disintegrating it!");break;
  209.             }
  210.  
  211.         }
  212.  
  213.  
  214. }
  215.  
  216. void screenmsgs::modecho(int mode)
  217.     {
  218.     int x=485,y=120;
  219.     char buf[3];
  220.     setfillstyle(0,0);
  221.     bar(x,y,x+88,y+9);
  222.     setcolor(0x0d);
  223.     switch (mode){
  224.  
  225.     case 1: outtextxy(x,y,"MOVES:");outtextxy(x+54,y,itoa(moves,buf,10));break;
  226.  
  227.     case 2: outtextxy(x,y,"FLIGHT:");outtextxy(x+64,y,itoa(moves,buf,10));break;
  228.  
  229.     case 3: setcolor(0x0f);outtextxy(x,y,"NEXT PIECE");break;
  230.  
  231.     case 4: setcolor(0x0c);outtextxy(x,y,"AIMING");break;
  232.  
  233.     case 5: outtextxy(x,y,"NEW TURN");break;
  234.     }
  235.  
  236. }
  237.  
  238. void screenmsgs::recho(char sqx,char sqy)
  239.     {
  240.     char outbuf[3];
  241.     int x=486,y=400;
  242.     setfillstyle(0,0);
  243.     bar(x,y,x+151,y+75);
  244.   setcolor(0x0e);
  245.     rectangle(482,397,638,479);//recho
  246.     setcolor(0x0c);
  247.     outtextxy(x,y,"Square: ");
  248.     outtextxy(x+64,y,itoa(sqx,outbuf,10));
  249.     outtextxy(x+88,y,itoa(sqy,outbuf,10));
  250.     if (sq[sqx][sqy].land==1)
  251.         {
  252.         setcolor(0x02);outtextxy(x,y+10,"Trees of");
  253.         setcolor(pcol[sq[sqx][sqy].whose]);
  254.         outtextxy(x+72,y+10,pname[sq[sqx][sqy].whose]);
  255.         }
  256.     if (sq[sqx][sqy].land==3){setcolor(0x06);outtextxy(x,y+10,"A stump");}
  257.     if (sq[sqx][sqy].land==4){setcolor(0x06);outtextxy(x,y+10,"A crater");}
  258.     if (sq[sqx][sqy].land==5){setcolor(0x08);outtextxy(x,y+10,"Mirkwoods");}
  259.     if (sq[sqx][sqy].land==6){setcolor(0x0a);outtextxy(x,y+10,"Tall grass");}
  260.     if (sq[sqx][sqy].land==7){setcolor(0x04);outtextxy(x,y+10,"Raging fires");}
  261.     if (sq[sqx][sqy].land==8){setcolor(0x0c);outtextxy(x,y+10,"Tall flames");}
  262.     if (sq[sqx][sqy].land==2){setcolor(0x04);outtextxy(x,y+10,"Wall");}
  263.   if (sq[sqx][sqy].land>=10){setcolor(0x07);outtextxy(x,y+10,"An Orb of");
  264.                              setcolor(pcol[sq[sqx][sqy].whose]);
  265.                              outtextxy(x+80,y+10,pname[sq[sqx][sqy].whose]);}
  266.     if (sq[sqx][sqy].whatside==0xff){return;}
  267.     else// if creature
  268.         {
  269.         if (mon[sq[sqx][sqy].whatside][sq[sqx][sqy].whatmonster].status==0x11)
  270.             { //if corpse
  271.             setcolor(0x08);
  272.             outtextxy(x,y+20,"The shade of a");
  273.             outtextxy(x,y+30,mon[sq[sqx][sqy].whatside][sq[sqx][sqy].whatmonster].name);
  274.             return;
  275.             }
  276.         if (sq[sqx][sqy].whatmonster==0)//if wizard
  277.             {
  278.             setcolor(pcol[sq[sqx][sqy].whatside]);
  279.             outtextxy(x,y+20,pname[sq[sqx][sqy].whatside]);
  280.             outtextxy(x,y+30,"himself.");
  281.  
  282.             }
  283.         else
  284.             {
  285.             setcolor(0x07);
  286.             outtextxy(x,y+20,mon[sq[sqx][sqy].whatside][sq[sqx][sqy].whatmonster].name);
  287.             outtextxy(x,y+30,"loyal to");
  288.             setcolor(pcol[sq[sqx][sqy].whatside]);
  289.             outtextxy(x,y+40,pname[sq[sqx][sqy].whatside]);
  290.             }
  291.         if ((mon[sq[sqx][sqy].whatside][sq[sqx][sqy].whatmonster].id>=0x80)&&
  292.              (mon[sq[sqx][sqy].whatside][sq[sqx][sqy].whatmonster].id!=0xff))
  293.             {                   //dont use status of illusions too obvious
  294.             setcolor(0x08);outtextxy(x,y+50,"(undead)");
  295.             }
  296.         if (mon[sq[sqx][sqy].whatside][sq[sqx][sqy].whatmonster].fly)
  297.             {
  298.             setcolor(0x03);outtextxy(x,y+60,"(flying)");
  299.             }
  300.         if (mon[sq[sqx][sqy].whatside][sq[sqx][sqy].whatmonster].spellnum)
  301.             {
  302.             setcolor(0x05);outtextxy(x+70,y+60,"(magical)");
  303.             }
  304.  
  305.         }
  306.  
  307. }
  308.  
  309.  
  310. void screenmsgs::trecho(monster attacker,char chopped)
  311.     {
  312.     int x=486,y=300;
  313.  
  314.     setfillstyle(0,0);
  315.     bar (x,y,x+149,y+50);
  316.     setcolor(pcol[attacker.whatside]);
  317.     outtextxy(x,y,attacker.name);
  318.     if(!chopped)
  319.         {
  320.         outtextxy(x,y+10,"fails hopelessly");
  321.         outtextxy(x,y+20,"to hit even a tree!");
  322.         }
  323.     else
  324.         {
  325.         setcolor(0x02);outtextxy(x,y+10,"hacks up the tree");
  326.         outtextxy(x,y+20,"and looks smug.");
  327.     }
  328.  
  329.  
  330. }
  331. void screenmsgs::boxes(void)
  332.     {
  333.     int i;
  334.     setcolor(0x0f);
  335.     setfillstyle(1,0);
  336.     bar(481,75,640,480);
  337.     //rectangle(481,0,639,479);
  338.  
  339.     setcolor(0x0c);
  340.     outtextxy(482,87,"Player and mode:");
  341.     outtextxy(482,187,"This creature:");
  342.     outtextxy(482,287,"Combat:");
  343.     outtextxy(482,387,"Looking at:");
  344.     setcolor(0x0d);
  345.  
  346.     bar(483,97,580,111);//plecho
  347.     bar(483,197,637,252);//mecho
  348.     bar(483,297,636,351);//fecho
  349.     bar(483,117,580,131);//modecho
  350.     bar(483,397,637,479);//recho
  351.  
  352.     rectangle(482,97,585,112);//plecho
  353.     rectangle(482,197,637,253);//mecho
  354.     rectangle(482,297,637,352);//fecho
  355.     rectangle(482,117,585,132);//modecho
  356.     rectangle(482,397,637,479);//recho
  357.  
  358. }
  359. extern void yinyang(int,int,int,signed int);
  360. void screenmsgs::spells(monster thismonster)
  361.     {
  362.  
  363.     int i=0;char outbuf[20];
  364.     char textcolor;
  365.     setfillstyle(1,20);
  366.     bar(482,0,640,480);
  367.  
  368.     bigtile(500,-20,logsp,2,0);
  369.     setcolor(0);setfillstyle(1,0);
  370.  
  371.     fillellipse(600,30,29,29);
  372.     yinyang(600,30,25,alignment[curpla]);
  373.     //settextstyle(0,0,3);outtextxy(498,10,"ARENA");settextstyle(0,0,2);
  374.     setcolor(0x1e);
  375.     outtextxy(482,70,pname[curpla]);
  376.     //outtextxy(482,70,"Spells:");
  377.     settextstyle(0,0,1);setcolor(0x1c);
  378.     while(i<thismonster.spellnum)
  379.         {
  380.  
  381.         strcpy(outbuf,spellname(thismonster.spells[i],&textcolor));
  382.         setcolor(textcolor);
  383.         outtextxy(482,95+i*10,outbuf);
  384.         //bip(thismonster.spells[i]/5);delay(10);
  385.         ++i;
  386.         }
  387.  
  388.  
  389. }
  390. void screenmsgs::logo(void)
  391.     {
  392.     //char loga[0x400],logb[0x400];
  393.  
  394.  
  395.     setfillstyle(1,0);bar(481,0,640,75);
  396.  
  397.     bigtile(490,10,loga,2,0);bigtile(554,10,logb,2,0);
  398.  
  399. }
  400.  
  401.  
  402. void screenmsgs::decho(char curpla)
  403.     {
  404.  
  405.     int i,j,px,py;
  406.  
  407.  
  408.     m.bitmapoff();
  409.  
  410.     deathwindow(120,140,370,245,1);
  411.  
  412.     for (i=0;i<0x400;++i)
  413.             {
  414.             px=130+(i % 32);py=150+(i / 32);
  415.             if (tile[mon[curpla][0].graphic][i]<0xfe) putpixel(px,py,tile[mon[curpla][0].graphic][i]);
  416.             if (tile[mon[curpla][0].graphic][i] == 0xfe)putpixel(px,py,pcol[curpla]);//print col of player
  417.             }
  418.     settextstyle(0,0,3);setcolor(pcol[curpla]);
  419.     outtextxy(165,160,pname[curpla]);
  420.     setcolor(0x07);
  421.     settextstyle(0,0,1);
  422.     if (kills[curpla]<4)
  423.         {
  424.         outtextxy(130,190,"has met a horrible end!");
  425.         outtextxy(130,200,"He is sadly mourned by his");
  426.         outtextxy(130,210,"devoted family and friends.");
  427.         outtextxy(130,220,"Wherever he is, everyone");
  428.         outtextxy(130,230,"hopes he is happy. *sniff*");
  429.         }
  430.     else
  431.         {
  432.         outtextxy(130,190,"has met his just desserts!");
  433.         outtextxy(130,200,"Everyone in the arena dances");
  434.         outtextxy(130,210,"on his grave.  There is a big");
  435.         outtextxy(130,220,"party!  Wherever he is, it's");
  436.         outtextxy(130,230,"probably really, really hot...");
  437.         }
  438.  
  439.     downbip(3);
  440.   mygetch();
  441.     m.bitmapon(cursor,pcol[curpla]);
  442.  
  443. }
  444.  
  445.  
  446.  
  447. void screenmsgs::deathwindow(int ax,int ay, int bx, int by,int size)
  448.     {
  449.     FILE *in;int px,py,middle,i;
  450.     unsigned char death[0x1000];
  451.     in=fopen("death.dat","rb");
  452.         for(i=0;i<0x1000;++i)
  453.             {
  454.             fscanf(in,"%c",&death[i]);
  455.             }
  456.  
  457.     setfillstyle(1,0);setcolor(0x0f);
  458.     bar(ax,ay,bx,by);
  459.     rectangle(ax,ay,bx,by);
  460.     middle=(ax+bx)/2;
  461.     for(i=0;i<0x1000;i++)
  462.         {
  463.         px=middle-(32*size)+(i%0x40)*size;py=ay-(38*size)+(i/0x40)*size;
  464.         if(death[i]<240)
  465.             {
  466.             setfillstyle(1,death[i]);
  467.             bar(px,py,px+size-1,py+size-1);
  468.             }
  469.         if(death[i]==248)
  470.             {
  471.             setfillstyle(1,247+curpla);
  472.             bar(px,py,px+size-1,py+size-1);
  473.       }
  474.         }
  475. }
  476.  
  477.  
  478. void screenmsgs::help()
  479.     {
  480.     setfillstyle(1,0);setcolor(0x07);
  481.     m.bitmapoff();
  482.     bar(150,100,330,400);
  483.     rectangle(150,100,330,400);
  484.  
  485.     bigtile(174,110,loga,2,0);bigtile(238,110,logb,2,0);
  486.     setcolor(0x0f);
  487.     outtextxy(160,180,"Moving:");setcolor(0x07);
  488.     outtextxy(160,190," Cast spells:   s");
  489.     outtextxy(160,200," Fire:          f");
  490.     outtextxy(160,210," Next:    <space>");
  491.     outtextxy(160,220," Fly:           t");
  492.     outtextxy(160,230," Quit:          Q");
  493.     outtextxy(160,240," Quit fast:     !");
  494.     outtextxy(160,250," Move:     keypad");
  495.     outtextxy(160,260," Move map:  mouse");setcolor(0x0f);
  496.     outtextxy(160,280,"Aiming:");setcolor(0x07);
  497.     outtextxy(160,290," Move map:  click");
  498.     outtextxy(160,300," Select:  <space>");setcolor(0x0f);
  499.     outtextxy(160,320,"Spells:");setcolor(0x07);
  500.     outtextxy(160,330," Real:     lclick");
  501.     outtextxy(160,340," Illusion: rclick");
  502.     outtextxy(160,350," Help:    <space>");
  503.     outtextxy(160,370,"Press something to");
  504.     outtextxy(160,380,"return to the game.");
  505.  
  506.  
  507.     mygetch();
  508.     m.bitmapon(cursor,pcol[curpla]);
  509. }
  510.  
  511.  
  512.  
  513. char * screenmsgs::spellname(int spell,char * spellcol)
  514.     {
  515.  
  516.     char evil=0x40;
  517.     char yellow=0x44;
  518.     char green=0x48;
  519.     char good=0x4c;
  520.  
  521.     switch (spell)
  522.     {
  523.     case 1:                        *spellcol=(yellow);
  524.     return("Fireball        LR");
  525.     case 0:                        *spellcol=(0x50);
  526.     return("...");
  527.     case 2:                        *spellcol=(yellow);
  528.     return("Chaos           --");
  529.     case 3:                        *spellcol=(yellow);
  530.     return("Magic arrow     LR");
  531.     case 4:                        *spellcol=(yellow);
  532.     return("Psionic ray     LR");
  533.     case 5:                        *spellcol=(green);
  534.     return("Strength        --");
  535.     case 6:                        *spellcol=(green);
  536.     return("Heroism         --");
  537.     case 7:                        *spellcol=(green);
  538.     return("Raise dead      --");
  539.     case 8:                        *spellcol=(green);
  540.     return("Create forest   --");
  541.     case 9:                        *spellcol=(green);
  542.     return("Create trees    LR");
  543.     case 10:                       *spellcol=(green);
  544.     return("Create walls    LR");
  545.     case 11:                       *spellcol=(yellow);
  546.     return("Blast           --");
  547.     case 12:                       *spellcol=(green);
  548.     return("Charm           L-");
  549.     case 13:                       *spellcol=(green);
  550.     return("Reincarnate     --");
  551.     case 14:                       *spellcol=(yellow);
  552.     return("Weakness        --");
  553.     case 15:                       *spellcol=(green);
  554.     return("Haste           --");
  555.     case 16:                       *spellcol=(green);
  556.     return("Fly             --");
  557.     case 17:                       *spellcol=(green);
  558.     return("Shield          --");
  559.     case 18:                       *spellcol=(yellow);
  560.     return("Swarm           -S");
  561.     case 19:                       *spellcol=(yellow);
  562.     return("Mana storm      -S");
  563.     case 20:                       *spellcol=(yellow);
  564.     return("Shockwave       -R");
  565.     case 21:                       *spellcol=(green);
  566.     return("Clone           --");
  567.     case 22:                       *spellcol=(yellow);
  568.     return("Earthquake      -R");
  569.     case 23:                       *spellcol=(green);
  570.     return("Create grass    LR");
  571.     case 24:                       *spellcol=(green);
  572.     return("Polymorph self  -S");
  573.     case 25:                       *spellcol=(yellow);
  574.     return("Create mirkwood LR");
  575.     case 26:                       *spellcol=(green);
  576.     return("Gift            --");
  577.     case 27:                       *spellcol=(green);
  578.     return("Teleport        L-");
  579.     case 28:                                       *spellcol=(0x04);
  580.     return("Curse           --");
  581.     case 29:                       *spellcol=(0x0f);
  582.     return("Bless           --");
  583.  
  584.  
  585.     case 30:                       *spellcol=0x0b;
  586.     return("Mirror           0");
  587.     case 31:                       *spellcol=(evil);
  588.     return("Call a beholder  4");
  589.     case 32:                       *spellcol=(good);
  590.     return("Call a retainer  0");
  591.     case 33:                       *spellcol=(evil);
  592.     return("Call a skeleton  2");
  593.     case 34:                       *spellcol=(evil);
  594.     return("Call a bat       2");
  595.     case 35:                       *spellcol=(good);
  596.     return("Call an archer   0");
  597.     case 36:                       *spellcol=(evil);
  598.     return("Call a goblin    1");
  599.     case 37:                       *spellcol=(evil);
  600.     return("Call red dragon  6");
  601.     case 38:                       *spellcol=(evil);
  602.     return("Call a spectre   3");
  603.     case 39:                       *spellcol=(evil);
  604.     return("Call a lich      6");
  605.     case 40:                       *spellcol=(evil);
  606.     return("Call a ghost     3");
  607.     case 41:                       *spellcol=(good);
  608.     return("Call gold dragon 7");
  609.     case 42:                       *spellcol=(good);
  610.     return("Call minions     0");
  611.     case 43:                       *spellcol=(green);
  612.     return("Summon           0");
  613.     case 44:                       *spellcol=(good);
  614.     return("Summon a nema    0");
  615.     case 45:                       *spellcol=(good);
  616.     return("Call a lion      4");
  617.     case 46:                       *spellcol=(good);
  618.     return("Call a brownie   1");
  619.     case 47:                       *spellcol=(good);
  620.     return("Call a sidhe     3");
  621.     case 48:                       *spellcol=(good);
  622.     return("Call a hound     0");
  623.     case 49:                       *spellcol=(evil);
  624.     return("Call a wolf      3");
  625.     case 50:                       *spellcol=(green);
  626.     return("Call something   3");
  627.     case 51:                       *spellcol=(good);
  628.     return("Call a gryphon   6");
  629.     case 52:                       *spellcol=(evil);
  630.     return("Call a manticore 5");
  631.     case 53:                       *spellcol=(good);
  632.     return("Call a centaur   5");
  633.     case 54:                       *spellcol=(good);
  634.     return("Call an eagle    4");
  635.     case 55:                       *spellcol=(good);
  636.     return("Call a giant     4");
  637.     case 56:                       *spellcol=(good);
  638.     return("Call salamander  5");
  639.     case 57:                       *spellcol=(evil);
  640.     return("Call a zombie    1");
  641.     case 58:                       *spellcol=(evil);
  642.     return("Call a hydra     4");
  643.  
  644.  
  645.     case 98:                       *spellcol=0x38;
  646.     return("The nema spell!        ");
  647.     case 99:                       *spellcol=78;
  648.     return("True Sight              "); //6 spaces and 2 tabs to make infinity sign...
  649.  
  650.     default:
  651.     return("*shrug*");
  652.     }
  653. }
  654.  
  655. void screenmsgs::spellhelp(int which)
  656.     {
  657.     char colour;char outbuf[30];unsigned long test;
  658.     setcolor(0x0f);setfillstyle(1,0);
  659.  
  660.  
  661.     bar(150,80,330,320);
  662.     rectangle(150,80,330,320);
  663.  
  664.     bigtile(174,90,loga,2,0);bigtile(238,90,logb,2,0);
  665.     outtextxy(160,170,"Help on:");
  666.     strcpy(outbuf,spellname(which,&colour));
  667.     setcolor(colour);
  668.     outtextxy(160,180,outbuf);
  669.  
  670.     switch(which)
  671.         {
  672.         case 1:outtextxy(160,200,"This spell casts a");
  673.                      outtextxy(160,210,"powerful missile");
  674.                      outtextxy(160,220,"with range about 6");
  675.                      outtextxy(160,230,"squares.  It can set");
  676.                      outtextxy(160,240,"fire to the ground");
  677.                      outtextxy(160,250,"and destroy shades.");
  678.                      break;
  679.         case 2:outtextxy(160,200,"Chaos is dangerous");
  680.                      outtextxy(160,210,"and unpredictable.");
  681.                      outtextxy(160,220,"Use only in times");
  682.                      outtextxy(160,230,"of desperation.");
  683.                      break;
  684.         case 3:outtextxy(160,200,"This spell casts a");
  685.                      outtextxy(160,210,"weak projectile.");
  686.  
  687.                      break;
  688.         case 4:outtextxy(160,200,"This spell casts a");
  689.                      outtextxy(160,210,"medium-strength");
  690.                      outtextxy(160,220,"beam of something");
  691.                      outtextxy(160,230,"destructive.");
  692.  
  693.                      break;
  694.         case 5:outtextxy(160,200,"This spell makes");
  695.                      outtextxy(160,210,"whatever it is cast");
  696.                      outtextxy(160,220,"on a little better");
  697.                      outtextxy(160,230,"at attacking and");
  698.                      outtextxy(160,240,"defending itself.");
  699.  
  700.                      break;
  701.         case 6:outtextxy(160,200,"Want a HERO on your");
  702.                      outtextxy(160,210,"side?  This spell");
  703.                      outtextxy(160,220,"makes whatever it is");
  704.                      outtextxy(160,230,"cast on into a ");
  705.                      outtextxy(160,240,"fighter of HEROIC");
  706.                      outtextxy(160,250,"abilities.");
  707.                      break;
  708.         case 7:outtextxy(160,200,"This spell brings a");
  709.                      outtextxy(160,210,"shade back to life.");
  710.                      outtextxy(160,220,"The shade will not");
  711.                      outtextxy(160,230,"necessarily be very");
  712.                      outtextxy(160,240,"grateful... so aim");
  713.                      outtextxy(160,250,"at one of your own.");
  714.  
  715.                      break;
  716.         case 8:outtextxy(160,200,"Making forests is");
  717.                      outtextxy(160,210,"good -- that's why");
  718.                      outtextxy(160,220,"this spell makes your");
  719.                      outtextxy(160,230,"alignment better as");
  720.                      outtextxy(160,240,"well as surrounding");
  721.                      outtextxy(160,250,"the target square");
  722.                      outtextxy(160,260,"with trees.");
  723.                      break;
  724.         case 9:outtextxy(160,200,"This allows you to");
  725.                      outtextxy(160,210,"create a few trees");
  726.                      outtextxy(160,220,"on any square you can");
  727.                      outtextxy(160,230,"see.  It also makes");
  728.                      outtextxy(160,240,"your alignment");
  729.                      outtextxy(160,250,"better.");
  730.                      break;
  731.         case 10:outtextxy(160,200,"Being shot at? Use");
  732.                      outtextxy(160,210,"this to create walls");
  733.                      outtextxy(160,220,"between you and them!");
  734.  
  735.                      break;
  736.         case 11:outtextxy(160,200,"This spell BLASTS");
  737.                      outtextxy(160,210,"the contents of one");
  738.                      outtextxy(160,220,"square.  It is not");
  739.                      outtextxy(160,230,"very accurate :)");
  740.                      break;
  741.         case 12:outtextxy(160,200,"This spell can");
  742.                      outtextxy(160,210,"make an enemy");
  743.                      outtextxy(160,220,"monster change sides.");
  744.                      outtextxy(160,230,"As the little 'L'");
  745.                      outtextxy(160,240,"after it suggests,");
  746.                      outtextxy(160,250,"though, you have to");
  747.                      outtextxy(160,260,"be able to see the");
  748.                      outtextxy(160,270,"target to use it.");
  749.  
  750.                      break;
  751.         case 13:outtextxy(160,200,"Reincarnation");
  752.                      outtextxy(160,210,"may bring back one");
  753.                      outtextxy(160,220,"of your vanished");
  754.                      outtextxy(160,230,"monsters -- even if");
  755.                      outtextxy(160,240,"it was an illusion.");
  756.  
  757.                      break;
  758.         case 14:outtextxy(160,200,"This spell makes");
  759.                      outtextxy(160,210,"whatever it is cast");
  760.                      outtextxy(160,220,"on a little worse");
  761.                      outtextxy(160,230,"at attacking and");
  762.                      outtextxy(160,240,"defending itself.");
  763.  
  764.                      break;
  765.         case 15:outtextxy(160,200,"This useful spell");
  766.                      outtextxy(160,210,"doubles the speed");
  767.                      outtextxy(160,220,"of whatever it is");
  768.                      outtextxy(160,230,"cast on. VERY nice");
  769.                      outtextxy(160,240,"if used on an eagle.");
  770.  
  771.                      break;
  772.         case 16:outtextxy(160,200,"This spell gives a");
  773.                      outtextxy(160,210,"monster the ability");
  774.                      outtextxy(160,220,"to fly, oddly enough.");
  775.  
  776.                      break;
  777.         case 17:outtextxy(160,200,"Protect your front-");
  778.                      outtextxy(160,210,"line units with this");
  779.                      outtextxy(160,220,"Shield!  It makes ");
  780.                      outtextxy(160,230,"whoever gets it DIE");
  781.                      outtextxy(160,240,"less often!");
  782.  
  783.                      break;
  784.         case 18:outtextxy(160,200,"A close-in defence");
  785.                      outtextxy(160,210,"spell.  Don't rely");
  786.                      outtextxy(160,220,"on it -- it hardly");
  787.                      outtextxy(160,230,"ever kills anything");
  788.                      outtextxy(160,240,"tougher than a ");
  789.                      outtextxy(160,250,"brownie.");
  790.                      break;
  791.  
  792.         case 19:outtextxy(160,200,"Brought to you from");
  793.                      outtextxy(160,210,"the game ANGBAND,");
  794.                      outtextxy(160,220,"this thing is deadly.");
  795.                      outtextxy(160,230,"Kills all non-wizzes");
  796.                      outtextxy(160,240,"indiscriminately.");
  797.  
  798.                      break;
  799.         case 20:outtextxy(160,200,"Destroys everything");
  800.                      outtextxy(160,210,"in a line between ");
  801.                      outtextxy(160,220,"caster and target. ");
  802.                      outtextxy(160,230,"Use when they're all");
  803.                      outtextxy(160,240,"lined up neatly.");
  804.  
  805.                      break;
  806.         case 21:outtextxy(160,200,"Makes you a clone of");
  807.                      outtextxy(160,210,"a monster, yours or");
  808.                      outtextxy(160,220,"the enemy's.  A clone");
  809.                      outtextxy(160,230,"is always real.  So");
  810.                      outtextxy(160,240,"don't make illusory");
  811.                      outtextxy(160,250,"dragons while your");
  812.                      outtextxy(160,260,"enemy has this ");
  813.                      outtextxy(160,270,"spell... unless of");
  814.                      outtextxy(160,280,"course you can charm");
  815.                      outtextxy(160,290,"it back...");
  816.  
  817.                      break;
  818.         case 22:outtextxy(160,200,"Devastating.  Ices");
  819.                      outtextxy(160,210,"all trees etc and");
  820.                      outtextxy(160,220,"most monsters near");
  821.                      outtextxy(160,230,"where it's cast.");
  822.                      outtextxy(160,240,"Short range, though.");
  823.                      outtextxy(160,260,"Like all special");
  824.                      outtextxy(160,270,"attacks, it won't get");
  825.                      outtextxy(160,280,"wizards and orbs.");
  826.  
  827.                      break;
  828.         case 23:outtextxy(160,200,"This allows you to");
  829.                      outtextxy(160,210,"create some grass");
  830.                      outtextxy(160,220,"on any square you can");
  831.                      outtextxy(160,230,"see, thus slowing");
  832.                      outtextxy(160,240,"movement down.");
  833.  
  834.                      break;
  835.         case 24:outtextxy(160,200,"This one's obvious.");
  836.                      outtextxy(160,210,"WARNING -- it's very");
  837.                      outtextxy(160,220,"unlikely that you'll");
  838.                      outtextxy(160,230,"polymorph into a wiz,");
  839.                      outtextxy(160,240,"so you might lose all ");
  840.                      outtextxy(160,250,"remaining spells.");
  841.                      break;
  842.  
  843.         case 25:outtextxy(160,200,"Make your alignment");
  844.                      outtextxy(160,210,"more evil by creating");
  845.                      outtextxy(160,220,"vicious mirkwoods to");
  846.                      outtextxy(160,230,"consume your foes!");
  847.  
  848.  
  849.                      break;
  850.         case 26:outtextxy(160,200,"This spell will ");
  851.                      outtextxy(160,210,"ask you to choose a");
  852.                      outtextxy(160,220,"second spell, then");
  853.                      outtextxy(160,230,"to choose who to give");
  854.                      outtextxy(160,240,"that spell to.  The");
  855.                      outtextxy(160,250,"spell is copied ");
  856.                      outtextxy(160,260,"rather than moved.");
  857.                      break;
  858.         case 27:outtextxy(160,200,"This spell will ask");
  859.                      outtextxy(160,210,"you to choose a ");
  860.                      outtextxy(160,220,"monster and then a ");
  861.                      outtextxy(160,230,"square. You must be");
  862.                      outtextxy(160,240,"in sight of the ");
  863.                      outtextxy(160,250,"monster; the square");
  864.                      outtextxy(160,260,"can be anywhere.");
  865.                      outtextxy(160,270,"You can't teleport ");
  866.                      outtextxy(160,280,"enemy wizards.");
  867.                      break;
  868.         case 28:outtextxy(160,200,"Like 'Blast', but");
  869.                      outtextxy(160,210,"only works on good");
  870.                      outtextxy(160,220,"monsters and trees.");
  871.                      outtextxy(160,230,"Inaccurate.");
  872.  
  873.  
  874.                      break;
  875.         case 29:outtextxy(160,200,"Like 'Blast' but");
  876.                      outtextxy(160,210,"only works on evil");
  877.                      outtextxy(160,220,"things and mirkwoods.");
  878.                      outtextxy(160,230,"Inaccurate.");
  879.                      break;
  880.  
  881.         case 30:outtextxy(160,200,"Makes a duplicate");
  882.                      outtextxy(160,210,"of yourself, with");
  883.                      outtextxy(160,220,"different spells.");
  884.                      outtextxy(160,230,"The duplicate isn't");
  885.                      outtextxy(160,240,"real, and thus tends");
  886.                      outtextxy(160,250,"not to last long.");
  887.                      break;
  888.  
  889.         case 31:outtextxy(160,200,"Slow, puny and poss-");
  890.                      outtextxy(160,210,"essing a nasty beam");
  891.                      outtextxy(160,220,"attack, the beholder");
  892.                      outtextxy(160,230,"is ideal defensive");
  893.                      outtextxy(160,240,"artillery.  Hide it");
  894.                      outtextxy(160,250,"in a tree for best");
  895.                      outtextxy(160,260,"results.");
  896.                      break;
  897.         case 32:outtextxy(160,200,"Retainers are so");
  898.                      outtextxy(160,210,"loyal, they always");
  899.                      outtextxy(160,220,"come to you.  Their");
  900.                      outtextxy(160,230,"abilities are, well,");
  901.                      outtextxy(160,240,"er... sort of");
  902.                      outtextxy(160,250,"averageish.");
  903.                      break;
  904.         case 33:outtextxy(160,200,"Skeletons?  Slow.");
  905.                      outtextxy(160,210,"Weak.  Socially un-");
  906.                      outtextxy(160,220,"successful. But");
  907.                      outtextxy(160,230,"undead and therefore");
  908.                      outtextxy(160,240,"unhittable by regular");
  909.                      outtextxy(160,250,"attacks.");
  910.  
  911.  
  912.                      break;
  913.  
  914.         case  99:outtextxy(160,200,"This spell will");
  915.                      outtextxy(160,210,"destroy any illusory");
  916.                      outtextxy(160,220,"monster. This ");
  917.                      outtextxy(160,230,"includes ones");
  918.                      outtextxy(160,240,"created by the");
  919.                      outtextxy(160,250,"mirror spell.");
  920.                      break;
  921.  
  922.     case  98:outtextxy(160,200,"The tea spell will");
  923.                      outtextxy(160,210,"double the powers");
  924.                      outtextxy(160,220,"of whatever it");
  925.                      outtextxy(160,230,"is cast upon, but");
  926.                      outtextxy(160,240,"it only has a range");
  927.                      outtextxy(160,250,"of one square.");
  928.  
  929.                      break;
  930.  
  931.     case  58:outtextxy(160,200,"This will create");
  932.                      outtextxy(160,210,"a massive hydra.");
  933.                      outtextxy(160,220,"These lumbering ");
  934.                      outtextxy(160,230,"monsters are slow");
  935.                      outtextxy(160,240,"but difficult to");
  936.                      outtextxy(160,250,"kill even with the");
  937.                      outtextxy(160,260,"most powerful");
  938.                      outtextxy(160,270,"magic.");
  939.  
  940.                      break;
  941.  
  942.     case  57:outtextxy(160,200,"Just like in the");
  943.                      outtextxy(160,210,"movies, but now");
  944.                      outtextxy(160,220,"reduced to a 32x32");
  945.                      outtextxy(160,230,"tile.  Although");
  946.                      outtextxy(160,240,"slow and feeble, it");
  947.                      outtextxy(160,250,"is immune to normal");
  948.                      outtextxy(160,260,"attacks.");
  949.                      break;
  950.  
  951.      case 56:outtextxy(160,200,"This spell creates");
  952.                      outtextxy(160,210,"a fiery salamander");
  953.                      outtextxy(160,220,"These elemental");
  954.                      outtextxy(160,230,"creatures come");
  955.                      outtextxy(160,240,"with three free");
  956.                      outtextxy(160,250,"fireball spells.");
  957.                      outtextxy(160,260,"Kind of like a poor");
  958.                      outtextxy(160,270,"man's dragon.");
  959.  
  960.                      break;
  961.  
  962.      case 55:outtextxy(160,200,"This spell brings");
  963.                      outtextxy(160,210,"a mighty giant to");
  964.                      outtextxy(160,220,"aid your armies.");
  965.                      outtextxy(160,230,"Giants attack with");
  966.                      outtextxy(160,240,"mighty strength");
  967.                      outtextxy(160,250,"and are not easily");
  968.                      outtextxy(160,260,"destroyed.");
  969.  
  970.                      break;
  971.  
  972.      case 54:outtextxy(160,200,"This spell creates");
  973.                      outtextxy(160,210,"a noble eagle. ");
  974.                      outtextxy(160,220,"These creatures are");
  975.                      outtextxy(160,230,"fast and fierce,");
  976.                      outtextxy(160,240,"but are easily ");
  977.                      outtextxy(160,250,"killed if they stray");
  978.                      outtextxy(160,260,"within range of an");
  979.                      outtextxy(160,270,"enemy.");
  980.  
  981.                      break;
  982.  
  983.     case  53:outtextxy(160,200,"The centaur is");
  984.                      outtextxy(160,210,"an ancient half man");
  985.                      outtextxy(160,220,"half horse. A good");
  986.                      outtextxy(160,230,"allrounder, able to");
  987.                      outtextxy(160,240,"fire arrows once per");
  988.                      outtextxy(160,250,"turn. With its good");
  989.                      outtextxy(160,260,"speed and formidable");
  990.                      outtextxy(160,270,"hooves it is much");
  991.                      outtextxy(160,280,"more use than a human");
  992.                      outtextxy(160,290,"archer.");
  993.  
  994.                      break;
  995.  
  996.     case  52:outtextxy(160,200,"The vile manticore");
  997.                      outtextxy(160,210,"is an evil monster");
  998.                      outtextxy(160,220,"able to fire spikes");
  999.                      outtextxy(160,230,"from its tail, in");
  1000.                      outtextxy(160,240,"addition to a fairly");
  1001.                      outtextxy(160,250,"powerful bite.");
  1002.  
  1003.                      break;
  1004.  
  1005.     case  51:outtextxy(160,200,"The fearsome");
  1006.                      outtextxy(160,210,"Gryphon is second");
  1007.                      outtextxy(160,220,"only to the dragons.");
  1008.                      outtextxy(160,230,"It can deliver");
  1009.                      outtextxy(160,240,"a ferocious ");
  1010.                      outtextxy(160,250,"attack from the air.");
  1011.  
  1012.                      break;
  1013.  
  1014.     case  50:outtextxy(160,200,"An unpredictable");
  1015.                      outtextxy(160,210,"spell that creates");
  1016.                      outtextxy(160,220,"a hideous mutant.");
  1017.                      outtextxy(160,230,"It's powers are");
  1018.                      outtextxy(160,240,"random, and it ");
  1019.                      outtextxy(160,250,"may be magical;");
  1020.                      outtextxy(160,260,"then again it's");
  1021.                      outtextxy(160,270,"often useless.");
  1022.  
  1023.                      break;
  1024.  
  1025.  
  1026.     case  49:outtextxy(160,200,"This spell gives");
  1027.                      outtextxy(160,210,"you command of an");
  1028.                      outtextxy(160,220,"evil wolf. With a");
  1029.                      outtextxy(160,230,"fair range, these");
  1030.                      outtextxy(160,240,"are a good addition");
  1031.                      outtextxy(160,250,"to any army.");
  1032.  
  1033.                      break;
  1034.  
  1035.     case  48:outtextxy(160,200,"While not as");
  1036.                      outtextxy(160,210,"powerful as the");
  1037.                      outtextxy(160,220,"wolf, these hounds");
  1038.                      outtextxy(160,230,"are loyal and the");
  1039.                      outtextxy(160,240,"spell cannot fail");
  1040.                      outtextxy(160,250,"to call one.");
  1041.  
  1042.                      break;
  1043.  
  1044.  
  1045.     case  47:outtextxy(160,200,"This spell creates");
  1046.                      outtextxy(160,210,"a small magical");
  1047.                      outtextxy(160,220,"creature. It's");
  1048.                      outtextxy(160,230,"like a brownie,");
  1049.                      outtextxy(160,240,"only useful.");
  1050.  
  1051.                      outtextxy(160,260,"Without its magic");
  1052.                      outtextxy(160,270,"the Sidhe is mere");
  1053.                      outtextxy(160,280,"dragon fodder.");
  1054.  
  1055.                      break;
  1056.  
  1057.     case  46:outtextxy(160,200,"How pathetic!  This");
  1058.                      outtextxy(160,210,"spell calls a worth-");
  1059.                      outtextxy(160,220,"less brownie, the");
  1060.                      outtextxy(160,230,"most hopeless thing");
  1061.                      outtextxy(160,240,"in the arena.  It");
  1062.                      outtextxy(160,250,"might block a few ");
  1063.                      outtextxy(160,260,"arrows before it");
  1064.                      outtextxy(160,270,"dies.");
  1065.                      break;
  1066.  
  1067.     case  45:outtextxy(160,200,"Fast and strong,");
  1068.                      outtextxy(160,210,"a lion will get the");
  1069.                      outtextxy(160,220,"better of many");
  1070.                      outtextxy(160,230,"creatures. Lions");
  1071.                      outtextxy(160,240,"are photogenic");
  1072.                      outtextxy(160,250,"and thus have a");
  1073.                      outtextxy(160,260,"good alignment.");
  1074.  
  1075.                      break;
  1076.     case  44:outtextxy(160,200,"This spell creates");
  1077.                      outtextxy(160,210,"a Nema! The Nema");
  1078.                      outtextxy(160,220,"will appear anywhere");
  1079.                      outtextxy(160,230,"in the arena. It");
  1080.                      outtextxy(160,240,"is a strange little");
  1081.                      outtextxy(160,250,"creature, useful");
  1082.                      outtextxy(160,260,"only for it's one");
  1083.                      outtextxy(160,270,"powerful spell.");
  1084.                      outtextxy(160,280,"After casting it's");
  1085.                      outtextxy(160,290,"spell it vanishes.");
  1086.  
  1087.                      break;
  1088.  
  1089.     case  43:outtextxy(160,200,"This spell randomly");
  1090.                      outtextxy(160,210,"calls zero to three");
  1091.                      outtextxy(160,220,"monsters, which");
  1092.                      outtextxy(160,230,"always appear and");
  1093.                      outtextxy(160,240,"are always real.");
  1094.                      outtextxy(160,250,"No dragons are");
  1095.                      outtextxy(160,260,"allowed, though.");
  1096.  
  1097.                      break;
  1098.  
  1099. case    42:outtextxy(160,200,"Calls for aid from");
  1100.                      outtextxy(160,210,"your loyal retainers");
  1101.                      outtextxy(160,220,"and archers.  ");
  1102.                      outtextxy(160,250,"This spell will");
  1103.                      outtextxy(160,260,"make your alignment");
  1104.                      outtextxy(160,270,"much more better.");
  1105.                      break;
  1106.  
  1107. case    41:outtextxy(160,200,"If this spell");
  1108.                      outtextxy(160,210,"works you will call");
  1109.                      outtextxy(160,220,"forth the mightiest");
  1110.                      outtextxy(160,230,"of all beasts.  With");
  1111.                      outtextxy(160,240,"up to two fireballs");
  1112.                      outtextxy(160,250,"a round and spells,");
  1113.                      outtextxy(160,260,"gold dragons are the");
  1114.                      outtextxy(160,270,"most powerful things");
  1115.                      outtextxy(160,280,"in the arena.");
  1116.  
  1117.                      break;
  1118.  
  1119.  
  1120.     case  40:outtextxy(160,200,"Scared?  Neither");
  1121.                      outtextxy(160,210,"will the enemy be.");
  1122.                      outtextxy(160,220,"However ghosts are");
  1123.                      outtextxy(160,230,"pretty fast and can");
  1124.                      outtextxy(160,240,"fly, and like all");
  1125.                      outtextxy(160,250,"undead cannot be hit");
  1126.  
  1127.                      outtextxy(160,260,"by the living.");
  1128.                      break;
  1129.     case  39:outtextxy(160,200,"Most lethal of the");
  1130.                      outtextxy(160,210,"undead, liches can");
  1131.                      outtextxy(160,220,"direct their evil");
  1132.                      outtextxy(160,230,"in a beam that des-");
  1133.                      outtextxy(160,240,"troys enemies... ");
  1134.                      outtextxy(160,250,"they also know the");
  1135.                      outtextxy(160,260,"occasional spell.");
  1136.                      outtextxy(160,270,"Nice to have.");
  1137.                      break;
  1138.  
  1139.     case  38:outtextxy(160,200,"Stronger than a ");
  1140.                      outtextxy(160,210,"ghost but slower,");
  1141.                      outtextxy(160,220,"the spectre is a");
  1142.                      outtextxy(160,230,"medium-strength");
  1143.                      outtextxy(160,240,"undead.");
  1144.  
  1145.                      break;
  1146.     case  37:outtextxy(160,200,"This spell will");
  1147.                      outtextxy(160,210,"try and call a");
  1148.                      outtextxy(160,220,"fire breathing red");
  1149.                      outtextxy(160,230,"dragon, second most");
  1150.                      outtextxy(160,240,"powerful thing in ");
  1151.                      outtextxy(160,250,"the arena.  Evil,");
  1152.                      outtextxy(160,260,"airborne, strong and");
  1153.                      outtextxy(160,270,"devilishly handsome.");
  1154.                      outtextxy(160,280,"Use a heroism spell");
  1155.                      outtextxy(160,290,"on it for added");
  1156.                      outtextxy(160,300,"kill-power.");
  1157.  
  1158.                      break;
  1159.  
  1160.     case  36:outtextxy(160,200,"Not very strong,");
  1161.                      outtextxy(160,210,"but not as naff");
  1162.                      outtextxy(160,220,"as a brownie.  They");
  1163.                      outtextxy(160,230,"die easily, but");
  1164.                      outtextxy(160,240,"people hardly ever");
  1165.                      outtextxy(160,250,"feel especially");
  1166.                      outtextxy(160,260,"sad about it.");
  1167.  
  1168.                      break;
  1169.  
  1170. case    35:outtextxy(160,200,"Surprisingly deadly,");
  1171.                      outtextxy(160,210,"archers can fire");
  1172.                      outtextxy(160,220,"twice in a round.");
  1173.                      outtextxy(160,230,"They have very long");
  1174.                      outtextxy(160,240,"range too.  Even a");
  1175.                      outtextxy(160,250,"dragon won't live");
  1176.                      outtextxy(160,260,"long with a few of");
  1177.                      outtextxy(160,270,"these hidden in the");
  1178.                      outtextxy(160,280,"trees around it.");
  1179.                      break;
  1180.  
  1181. case    34:outtextxy(160,200,"Easy to scoff at,");
  1182.                      outtextxy(160,210,"the bat is fast and");
  1183.                      outtextxy(160,220,"able to fly, but");
  1184.                      outtextxy(160,230,"feeble.  After a");
  1185.                      outtextxy(160,240,"few strength spells,");
  1186.                      outtextxy(160,250,"though, they get kind");
  1187.                      outtextxy(160,260,"of dangerous.");
  1188.  
  1189.  
  1190.         }
  1191.  
  1192.     mygetch();
  1193.  
  1194.     drawmap(curx,cury);
  1195. }
  1196.  
  1197.  
  1198. void screenmsgs::graph(int history[4][50],char * label, char * label2)
  1199.     {
  1200.     char buf[3];
  1201.     int i,j,num=0,current_x,lastx,lasty;
  1202.     float yscale,xscale;
  1203.     deathwindow(50,100,590,430,2);
  1204.     setcolor(0x07);
  1205.     outtextxy(70,110,"Here's how Death");
  1206.     outtextxy(70,120,label);
  1207.     outtextxy(70,130,label2);
  1208.     outtextxy(60,150,"P");
  1209.     outtextxy(60,160,"O");
  1210.     outtextxy(60,170,"W");
  1211.     outtextxy(60,180,"E");
  1212.     outtextxy(60,190,"R");
  1213.     outtextxy(480,398,"T U R N");
  1214.     line(80,150,80,380);line(80,380,550,380);
  1215.     xscale=(float)520/(float)thisturn;
  1216.     for(i=1;i<thisturn-1;++i)
  1217.         {
  1218.         setcolor(0x03);
  1219.  
  1220.             if((i%5==0)||(thisturn<20)) //if lots of turns print only every 5
  1221.             {
  1222.             outtextxy(80+(i*xscale),386,itoa(i,buf,10));
  1223.             }
  1224.         }
  1225.     for(i=0;i<players;++i)
  1226.         {
  1227.         for(j=0;j<thisturn;++j)
  1228.             {                    //find highest ever strength
  1229.             if(history[i][j]>num)num=history[i][j];
  1230.             }
  1231.         }
  1232.     yscale=(float)250/(float)num;
  1233.     if(yscale>1)yscale=1;//no point scaling it up if all the players were
  1234.                                                 //wimps
  1235.  
  1236.  
  1237.  
  1238.     for(i=0;i<players;++i)
  1239.         {
  1240.         setcolor(pcol[i]);
  1241.         //moveto(70,380-strength_history[i][0]*yscale);
  1242.         current_x=80;lastx=80;lasty=380-history[i][0];
  1243.         for(j=1;j<thisturn;++j)
  1244.             {
  1245.             lastx=current_x;
  1246.             line(lastx,lasty,current_x+xscale,380-history[i][j]*yscale);
  1247.             current_x+=xscale;
  1248.             lasty=380-history[i][j]*yscale;
  1249.             }
  1250.         }
  1251.  
  1252.  
  1253.  
  1254.  
  1255.     mygetch();
  1256.  
  1257. }
  1258.  
  1259.  
  1260. void screenmsgs::bargraph(int numbers[4],char * label,char * label2)
  1261.     {
  1262.     int i,xscale;
  1263.     deathwindow(50,100,590,430,2);
  1264.     setcolor(0x07);
  1265.     outtextxy(70,110,"Here's how Death");
  1266.     outtextxy(70,120,label);
  1267.     outtextxy(70,130,label2);
  1268.     outtextxy(60,150,"P");
  1269.     outtextxy(60,160,"L");
  1270.     outtextxy(60,170,"U");
  1271.     outtextxy(60,180,"S");
  1272.     outtextxy(60,280,"M");
  1273.     outtextxy(60,290,"I");
  1274.     outtextxy(60,300,"N");
  1275.     outtextxy(60,310,"U");
  1276.     outtextxy(60,320,"S");
  1277.     outtextxy(440,256,"P L A Y E R");
  1278.     line(80,150,80,380);
  1279.  
  1280.     xscale=470/(players*2);
  1281.  
  1282.     for(i=0;i<players;++i)
  1283.         {
  1284.         setfillstyle(1,pcol[i]);    //add random number; otherwise graph is too boring.
  1285.         bar(80+xscale*(i+1),250-(numbers[i]*10)+random(20)-10,80+xscale*(i+2),250);
  1286.         }
  1287.     line(80,250,550,250); //draws it afterward to conceal neutral bars.
  1288.     mygetch();
  1289. }